/*
 * TimeTaggerSCPI.h
 *
 *  Created on: 18.03.2013
 *      Author: mag
 */

#ifndef TIMETAGGERSCPI_H_
#define TIMETAGGERSCPI_H_

#include "SCPI.h"

class TimeTaggerSCPIContext : public SCPIContext {
public:
	TimeTaggerSCPIContext(SCPI *);

	int current_slot;
};

static const int ERR_BAD_SLOT_SPEC=200;
static const int ERR_NO_MORE_SLOTS=201;
static const int ERR_SLOT_IN_USE=201;
static const int ERR_BAD_CHANNEL_SPEC=202;


class TimeTaggerSCPI : public SCPI {

	static const char *vendor;
	static const char *device;
	static const char *version;

public:
	TimeTaggerSCPI();
	virtual ~TimeTaggerSCPI();

	virtual SCPIContext *new_context();
	static const scpi_command_t *scpi_commands;

	int error(TimeTaggerSCPIContext *, int_fast16_t err);

	scpi_result_t reset(TimeTaggerSCPIContext *);
	scpi_result_t test(TimeTaggerSCPIContext *);

	scpi_result_t IDN(TimeTaggerSCPIContext *);
	scpi_result_t SYST_VERS(TimeTaggerSCPIContext *);

	scpi_result_t CONF_HELP(TimeTaggerSCPIContext *);
	scpi_result_t CONF_LIST(TimeTaggerSCPIContext *);
	scpi_result_t CONF_REMO(TimeTaggerSCPIContext *);
	scpi_result_t CONF_USE(TimeTaggerSCPIContext *);
	scpi_result_t CONF_USE_Q(TimeTaggerSCPIContext *);

	scpi_result_t CONF_OVER(TimeTaggerSCPIContext *);
	scpi_result_t CONF_OVER_HELP(TimeTaggerSCPIContext *);

	scpi_result_t CONF_COUNT(TimeTaggerSCPIContext *);
	scpi_result_t CONF_COUNT_HELP(TimeTaggerSCPIContext *);

	scpi_result_t CONF_COUNTR(TimeTaggerSCPIContext *);
	scpi_result_t CONF_COUNTR_HELP(TimeTaggerSCPIContext *);

	scpi_result_t CONF_HISTO(TimeTaggerSCPIContext *);
	scpi_result_t CONF_HISTO_HELP(TimeTaggerSCPIContext *);

	scpi_result_t CONF_DIST(TimeTaggerSCPIContext *);
	scpi_result_t CONF_DIST_HELP(TimeTaggerSCPIContext *);

	scpi_result_t CONF_CHISTO(TimeTaggerSCPIContext *);
	scpi_result_t CONF_CHISTO_HELP(TimeTaggerSCPIContext *);

	scpi_result_t CONF_COUNTB(TimeTaggerSCPIContext *);
	scpi_result_t CONF_COUNTB_HELP(TimeTaggerSCPIContext *);

	scpi_result_t CONF_PULSED(TimeTaggerSCPIContext *);
	scpi_result_t CONF_PULSED_HELP(TimeTaggerSCPIContext *);


	scpi_result_t TRIG_HELP(TimeTaggerSCPIContext *);
	scpi_result_t TRIG_LIST(TimeTaggerSCPIContext *);
	scpi_result_t TRIG_SET_START(TimeTaggerSCPIContext *);
	scpi_result_t TRIG_SET_END(TimeTaggerSCPIContext *);
	scpi_result_t TRIG_SET_RESTART(TimeTaggerSCPIContext *);

};


#endif /* TIMETAGGERSCPI_H_ */
